#pragma once
#include "nnse_support.h"

namespace SimpleGUI
{
	template <class T, class U> public ref class Neuron : public System::Windows::Forms::Form
	{
		// Constructor and Destructor	
			public: Neuron(nnse::neuron<T, U>^ p);
			protected: virtual ~Neuron();
		// Member Variables
			private: System::ComponentModel::Container^ components;
			private: System::Windows::Forms::Label^  number_label;
			private: System::Windows::Forms::TextBox^  number_textBox;
			private: System::Windows::Forms::Label^  NET_label;
			private: System::Windows::Forms::TextBox^  NET_textBox;
			private: System::Windows::Forms::Label^  OUT_label;
			private: System::Windows::Forms::TextBox^  OUT_textBox;
			private: System::Windows::Forms::Label^  ERR_label;
			private: System::Windows::Forms::TextBox^  ERR_textBox;
			private: System::Windows::Forms::Label^  DELTA_label;
			private: System::Windows::Forms::TextBox^  DELTA_textBox;
			private: System::Windows::Forms::Label^  number_of_dendrites_label;
			private: System::Windows::Forms::TextBox^  number_of_dendrites_textBox;
			private: System::Windows::Forms::Button^  view_button;
			private: nnse::neuron<T, U>^ parent;
		// GUI Functions
			private: System::Void view_button_Click(System::Object^  sender, System::EventArgs^  e);
			private: System::Void form_closed(System::Object^  sender, System::Windows::Forms::FormClosedEventArgs^  e);
			public: System::Void update_form();
#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			this->number_label = (gcnew System::Windows::Forms::Label());
			this->number_of_dendrites_label = (gcnew System::Windows::Forms::Label());
			this->NET_label = (gcnew System::Windows::Forms::Label());
			this->OUT_label = (gcnew System::Windows::Forms::Label());
			this->ERR_label = (gcnew System::Windows::Forms::Label());
			this->DELTA_label = (gcnew System::Windows::Forms::Label());
			this->number_textBox = (gcnew System::Windows::Forms::TextBox());
			this->number_of_dendrites_textBox = (gcnew System::Windows::Forms::TextBox());
			this->NET_textBox = (gcnew System::Windows::Forms::TextBox());
			this->OUT_textBox = (gcnew System::Windows::Forms::TextBox());
			this->ERR_textBox = (gcnew System::Windows::Forms::TextBox());
			this->DELTA_textBox = (gcnew System::Windows::Forms::TextBox());
			this->view_button = (gcnew System::Windows::Forms::Button());
			this->SuspendLayout();
			// 
			// number_label
			// 
			this->number_label->AutoSize = true;
			this->number_label->Location = System::Drawing::Point(12, 9);
			this->number_label->Name = L"number_label";
			this->number_label->Size = System::Drawing::Size(47, 13);
			this->number_label->TabIndex = 0;
			this->number_label->Text = L"Number:";
			// 
			// number_of_dendrites_label
			// 
			this->number_of_dendrites_label->AutoSize = true;
			this->number_of_dendrites_label->Location = System::Drawing::Point(12, 141);
			this->number_of_dendrites_label->Name = L"number_of_dendrites_label";
			this->number_of_dendrites_label->Size = System::Drawing::Size(107, 13);
			this->number_of_dendrites_label->TabIndex = 1;
			this->number_of_dendrites_label->Text = L"Number of Dendrites:";
			// 
			// NET_label
			// 
			this->NET_label->AutoSize = true;
			this->NET_label->Location = System::Drawing::Point(12, 36);
			this->NET_label->Name = L"NET_label";
			this->NET_label->Size = System::Drawing::Size(32, 13);
			this->NET_label->TabIndex = 2;
			this->NET_label->Text = L"NET:";
			// 
			// OUT_label
			// 
			this->OUT_label->AutoSize = true;
			this->OUT_label->Location = System::Drawing::Point(12, 62);
			this->OUT_label->Name = L"OUT_label";
			this->OUT_label->Size = System::Drawing::Size(33, 13);
			this->OUT_label->TabIndex = 3;
			this->OUT_label->Text = L"OUT:";
			// 
			// ERR_label
			// 
			this->ERR_label->AutoSize = true;
			this->ERR_label->Location = System::Drawing::Point(12, 88);
			this->ERR_label->Name = L"ERR_label";
			this->ERR_label->Size = System::Drawing::Size(33, 13);
			this->ERR_label->TabIndex = 4;
			this->ERR_label->Text = L"ERR:";
			// 
			// DELTA_label
			// 
			this->DELTA_label->AutoSize = true;
			this->DELTA_label->Location = System::Drawing::Point(12, 114);
			this->DELTA_label->Name = L"DELTA_label";
			this->DELTA_label->Size = System::Drawing::Size(45, 13);
			this->DELTA_label->TabIndex = 5;
			this->DELTA_label->Text = L"DELTA:";
			// 
			// number_textBox
			// 
			this->number_textBox->Location = System::Drawing::Point(124, 6);
			this->number_textBox->Name = L"number_textBox";
			this->number_textBox->Size = System::Drawing::Size(100, 20);
			this->number_textBox->TabIndex = 6;
			// 
			// number_of_dendrites_textBox
			// 
			this->number_of_dendrites_textBox->Location = System::Drawing::Point(124, 138);
			this->number_of_dendrites_textBox->Name = L"number_of_dendrites_textBox";
			this->number_of_dendrites_textBox->Size = System::Drawing::Size(100, 20);
			this->number_of_dendrites_textBox->TabIndex = 7;
			// 
			// NET_textBox
			// 
			this->NET_textBox->Location = System::Drawing::Point(124, 33);
			this->NET_textBox->Name = L"NET_textBox";
			this->NET_textBox->Size = System::Drawing::Size(100, 20);
			this->NET_textBox->TabIndex = 8;
			// 
			// OUT_textBox
			// 
			this->OUT_textBox->Location = System::Drawing::Point(124, 59);
			this->OUT_textBox->Name = L"OUT_textBox";
			this->OUT_textBox->Size = System::Drawing::Size(100, 20);
			this->OUT_textBox->TabIndex = 9;
			// 
			// ERR_textBox
			// 
			this->ERR_textBox->Location = System::Drawing::Point(124, 85);
			this->ERR_textBox->Name = L"ERR_textBox";
			this->ERR_textBox->Size = System::Drawing::Size(100, 20);
			this->ERR_textBox->TabIndex = 10;
			// 
			// DELTA_textBox
			// 
			this->DELTA_textBox->Location = System::Drawing::Point(124, 111);
			this->DELTA_textBox->Name = L"DELTA_textBox";
			this->DELTA_textBox->Size = System::Drawing::Size(100, 20);
			this->DELTA_textBox->TabIndex = 11;
			// 
			// view_button
			// 
			this->view_button->Location = System::Drawing::Point(15, 171);
			this->view_button->Name = L"view_button";
			this->view_button->Size = System::Drawing::Size(209, 23);
			this->view_button->TabIndex = 12;
			this->view_button->Text = L"View Dendrites in this Neuron";
			this->view_button->UseVisualStyleBackColor = true;
			this->view_button->Click += gcnew System::EventHandler(this, &Neuron::view_button_Click);
			// 
			// Neuron
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(235, 201);
			this->Controls->Add(this->view_button);
			this->Controls->Add(this->DELTA_textBox);
			this->Controls->Add(this->ERR_textBox);
			this->Controls->Add(this->OUT_textBox);
			this->Controls->Add(this->NET_textBox);
			this->Controls->Add(this->number_of_dendrites_textBox);
			this->Controls->Add(this->number_textBox);
			this->Controls->Add(this->DELTA_label);
			this->Controls->Add(this->ERR_label);
			this->Controls->Add(this->OUT_label);
			this->Controls->Add(this->NET_label);
			this->Controls->Add(this->number_of_dendrites_label);
			this->Controls->Add(this->number_label);
			this->Name = L"Neuron";
			this->Text = L"Neuron";
			this->FormClosed += gcnew System::Windows::Forms::FormClosedEventHandler(this, &Neuron::form_closed);
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion
	};
}
